package Sources;
/****************************
 * A simple implementation of sources handling using
 * a hash set as a container
 ****************************/
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;

public class SourcesHash implements Sources{
	HashSet<String> content;
	public SourcesHash() {
		content=new HashSet<String>();
	}
	
	public void deleteSource(String what) {
		content.remove(what);
	}

	public List<String> getSources() {
		List<String> ret=new ArrayList<String>();
		Iterator<String> it=content.iterator();
		while(it.hasNext()){
			ret.add(it.next());
		}
		return ret;
	}

	public void insertSource(String path) {
		content.add(path);
		
	}
	public void setSource(String from, String to) {
		deleteSource(from);
		insertSource(to);
		
	}

	public void insertSource(String path, String[] exp) {
		// TODO Auto-generated method stub
		
	}

	public void setSource(String from, String to, String[] exp) {
		// TODO Auto-generated method stub
		
	}



}
